/*     */ package com.lmpop.trade.ti_caseoperation;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.dao.IbatisDbmImpl;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class Ti_caseoperationInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */   DbmInterf dbmMgr;
/*     */ 
/*     */   public Ti_caseoperationInfo()
/*     */   {
/*  18 */     this.queryList = new QueryList();
/*  19 */     this.dbmMgr = new IbatisDbmImpl();
/*     */   }
/*     */ 
/*     */   public void addLawyerCase(Ti_caseoperation ti_caseoperation)
/*     */   {
/*  28 */     DbmInterf dbmMgr = new IbatisDbmImpl();
/*     */     try {
/*  30 */       dbmMgr.update("insertTi_caseoperation", ti_caseoperation);
/*     */     } catch (Exception e) {
/*  32 */       e.printStackTrace();
/*     */     }
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map) {
/*  37 */     Ti_caseoperation ti_caseoperation = new Ti_caseoperation();
/*  38 */     ti_caseoperation.setCase_id(map.getString("case_id"));
/*  39 */     ti_caseoperation.setLawyer_id(map.getString("lawyer_id"));
/*     */ 
/*  41 */     ti_caseoperation.setCommission_fees(map.getString("commission_fees"));
/*  42 */     ti_caseoperation.setCur_state(map.getString("cur_state"));
/*  43 */     ti_caseoperation.setService_id(map.getString("service_id"));
/*  44 */     ti_caseoperation.setOperator_id(map.getString("operator_id"));
/*  45 */     ti_caseoperation.setDoes_signing(map.getString("does_signing"));
/*     */ 
/*  47 */     String result_code = "0";
/*     */     try {
/*  49 */       insert(dbmMgr, ti_caseoperation);
/*     */     } catch (ApplicationException e) {
/*  51 */       e.printStackTrace();
/*  52 */       result_code = "1";
/*     */     }
/*  54 */     map.setString("result_code", result_code);
/*  55 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_caseoperation ti_caseoperation)
/*     */     throws ApplicationException
/*     */   {
/*  64 */     dbmMgr.update("insertTi_caseoperation", ti_caseoperation);
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  74 */     String pkid_string = map.getString("case_id");
/*  75 */     String result_code = "0";
/*     */     try {
/*  77 */       if (!pkid_string.equals("")) {
/*  78 */         String[] pkStr = pkid_string.split("\\|");
/*  79 */         for (int i = 0; i < pkStr.length; i++) {
/*  80 */           if (pkStr[i].equals("")) continue; delete(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/*  84 */       e.printStackTrace();
/*  85 */       result_code = "1";
/*     */     }
/*  87 */     map.setString("result_code", result_code);
/*  88 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/*  97 */     dbmMgr.update("deleteTi_caseoperation", pkid);
/*     */   }
/*     */ 
/*     */   public void delete(String pkid) {
/*     */     try {
/* 102 */       this.dbmMgr.update("deleteTi_caseoperation", pkid);
/*     */     } catch (ApplicationException e) {
/* 104 */       e.printStackTrace();
/*     */     }
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 113 */     Ti_caseoperation ti_caseoperation = new Ti_caseoperation();
/* 114 */     ti_caseoperation.setCase_id(map.getString("case_id"));
/* 115 */     ti_caseoperation.setLawyer_id(map.getString("lawyer_id"));
/*     */ 
/* 117 */     ti_caseoperation.setCommission_fees(map.getString("commission_fees"));
/* 118 */     ti_caseoperation.setCur_state(map.getString("cur_state"));
/* 119 */     ti_caseoperation.setService_id(map.getString("service_id"));
/* 120 */     ti_caseoperation.setOperator_id(map.getString("operator_id"));
/* 121 */     ti_caseoperation.setDoes_signing(map.getString("does_signing"));
/*     */ 
/* 123 */     String result_code = "0";
/*     */     try {
/* 125 */       update(dbmMgr, ti_caseoperation);
/*     */     } catch (ApplicationException e) {
/* 127 */       e.printStackTrace();
/* 128 */       result_code = "1";
/*     */     }
/* 130 */     map.setString("result_code", result_code);
/* 131 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_caseoperation ti_caseoperation)
/*     */     throws ApplicationException
/*     */   {
/* 140 */     dbmMgr.update("updateTi_caseoperation", ti_caseoperation);
/*     */   }
/*     */ 
/*     */   public void update(Ti_caseoperation ti_caseoperation) {
/*     */     try {
/* 145 */       this.dbmMgr.update("updateTi_caseoperation", ti_caseoperation);
/*     */     } catch (ApplicationException e) {
/* 147 */       e.printStackTrace();
/*     */     }
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/* 158 */     Hashtable ti_caseoperation = (Hashtable)obj;
/* 159 */     if (start == 0)
/* 160 */       start = 0;
/*     */     else {
/* 162 */       start = (start - 1) * limit;
/*     */     }
/* 164 */     ti_caseoperation.put("start", Integer.valueOf(start));
/* 165 */     ti_caseoperation.put("limit", Integer.valueOf(limit));
/* 166 */     return this.queryList.getList("getListByTi_caseoperationPage", ti_caseoperation);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 177 */     Hashtable ti_caseoperation = (Hashtable)obj;
/* 178 */     List list = this.queryList.getList("getCountByObjTi_caseoperation", ti_caseoperation);
/* 179 */     int count = 0;
/* 180 */     if ((list != null) && (list.size() > 0)) {
/* 181 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 182 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 183 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 186 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByLawyerCasePage(Map ti_caseoperation, int start, int limit)
/*     */   {
/* 191 */     if (start == 0)
/* 192 */       start = 0;
/*     */     else {
/* 194 */       start = (start - 1) * limit;
/*     */     }
/* 196 */     ti_caseoperation.put("start", Integer.valueOf(start));
/* 197 */     ti_caseoperation.put("limit", Integer.valueOf(limit));
/* 198 */     return this.queryList.getList("getListByLawyerCasePage", ti_caseoperation);
/*     */   }
/*     */ 
/*     */   public int getCountByLawyerCaseObj(Map ti_caseoperation)
/*     */   {
/* 209 */     List list = this.queryList.getList("getCountByLawyerCaseObj", ti_caseoperation);
/* 210 */     int count = 0;
/* 211 */     if ((list != null) && (list.size() > 0)) {
/* 212 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 213 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 214 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 217 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk)
/*     */   {
/* 227 */     return this.queryList.getList("getTi_caseoperationByPk", pk);
/*     */   }
/*     */ 
/*     */   public SysMap updateCur_state(DbmInterf dbmMgr, SysMap map) {
/* 231 */     Ti_caseoperation ti_caseoperation = new Ti_caseoperation();
/* 232 */     String pkid_string = map.getString("pkid");
/* 233 */     String cur_state = map.getString("case_state");
/* 234 */     String result_code = "0";
/*     */     try {
/* 236 */       if (!pkid_string.equals("")) {
/* 237 */         String[] pkStr = pkid_string.split("\\|");
/* 238 */         for (int i = 0; i < pkStr.length; i++) {
/* 239 */           if (!pkStr[i].equals(""))
/* 240 */             ti_caseoperation.setCase_id(pkStr[i]);
/* 241 */           ti_caseoperation.setCur_state(cur_state);
/* 242 */           updateCur_state(dbmMgr, ti_caseoperation);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/* 246 */       e.printStackTrace();
/* 247 */       result_code = "1";
/*     */     }
/* 249 */     map.setString("result_code", result_code);
/* 250 */     return map;
/*     */   }
/*     */ 
/*     */   public void updateCur_state(DbmInterf dbmMgr, Ti_caseoperation ti_caseoperation) throws ApplicationException {
/* 254 */     dbmMgr.update("updateCur_state", ti_caseoperation);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_caseoperation.Ti_caseoperationInfo
 * JD-Core Version:    0.6.0
 */